The present invention relates to priority control in interrupt handling or bus arbitration control, especially a method and apparatus suitable to priority control for indicating a priority level to each channel.
In a system, in which process requests from a plurality of independent processing units are generated with arbitrary timings, it is necessary to use a preference circuit for judging priority. In the prior art, there has been used a method to give inherent priority to each processing unit. Namely, if within a period from a request of one processing unit to a grant of the process request another request of another processing unit occurs, the preference circuit selects one of the processing units which should be accepted in accordance with an inherent priority. In this priority control, if process requests having high priority and frequently generated, it will possibly lead to a long wait for process requests having lower priority.
In order to exclude the possibility of this problem occurring, for example, as described in Japanese Laid Open Application No. 62-111345 (published on May 22, 1987), there have been developed some techniques, in one of which the first occurred process request constantly has priority, even if it has a low inherent priority, by using a register for indicating waiting requests having higher priority together with registers for holding channel numbers corresponding to the processing units having already requested. Further, there have been considered other techniques such as a so-called round robin method, in which the order of priority is changed at each acceptance of the request, and the same priority level is allotted to channels having the same emergency.
In the above mentioned prior method for using a register for indicating waits of requests, it is necessary to use means for comparing priority between the precedent process request and the newly generated process request, and further it is inconvenient for the higher priority request to wait unnecessarily because of the lower priority request. Further, in the above mentioned round robin method, since it is impossible to previously set the fixed order of priority, it is difficult to discriminate the high priority requests having emergency and the low priority requests.
Further, in the last mentioned technique, it is necessary to determine a unit which should be accepted using another method except the order of priority, in a case that a plurality of the process requests having the same priority level occurs. Therefore, for example, there has been used a method for giving priority to a channel having a lower number. As a result, impartiality of the channels having the same priority level is disturbed or lost.